package com.maimao.kill.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.maimao.model.kill.KillGoods;
import com.maimao.model.kill.vo.KillGoodsVo;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2021/4/22 下午10:23
 */
@Data
public class KillGoodsShowVo implements Serializable {
    /**
     * 秒杀中的商品
     */
    private Map<String, List<KillGoodsVo>> onKillGoodsData;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime now = LocalDateTime.now();
    /**
     * 后面4个排期的商品 key：排期id value:该排期下的商品
     */
    private Map<String, List<KillGoodsVo>> scheduleGoodsData;
}
